home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-12-10 | 11.1 KB | 429 lines | [TEXT/R*ch] |
-
- ######################################################################
- # Access Window Content
- ######################################################################
-
- <Topic Area> "GX screen Dump"
-
- <Header> "Tutorial"
-
- <Topic> "From Start", "Tutorial From Start"
- <Topic> "Skip completed lessons", "Tutorial Skip lessons"
- <Topic> "Lesson 1", "Lesson 1"
- <Topic> "Lesson 2", "Lesson 2"
- <Topic> "Lesson 3", "Lesson 3"
-
- <Header> "House keeping"
-
- <Topic> "Reset the Lesson plan", "Reset the Lesson plan"
- <Topic> "Display Lesson plan Status", "What is the Lesson Status?"
-
-
- ######################################################################
- # Tutorial From Start Sequence & Panel
- #
- # This sequence puts up an intro panel then steps through each lesson
- # in turn. The first panel uses the "StartHelperApp" script to
- # launch the helper app. It then clears all the values.
- #
- ######################################################################
-
- <Define Sequence> "Tutorial From Start", "Tutorial"
- <Panel> "Tutorial From Start - Intro"
-
- <Jump Sequence> "Lesson 1"
-
- <Jump Sequence> "Lesson 2"
-
- <Jump Sequence> "Lesson 3"
-
- <Panel> "Tutorial Outro"
- <End Sequence>
-
-
- <Define Panel> "Tutorial From Start - Intro"
- <On Panel Create> DoAppleScript( "StartHelperApp" )
- <On Panel Create> ClearValues()
- This is the first panel in the tutorial.
- It launches the helper App, then clears the values.
- <End Panel>
-
- ######################################################################
- # Tutorial Skip lessons - Sequence & Panel
- #
- # This sequence puts up an intro panel then steps through each lesson
- # in turn which hasn't been completed. The first panel uses the
- # "StartHelperApp" script to launch the helper app.
- #
- ######################################################################
-
- <Define Sequence> "Tutorial Skip lessons", "Tutorial"
- <Panel> "Tutorial Intro"
-
- <If> NOT Flag1Set()
- <Jump Sequence> "Lesson 1"
- <End If>
-
- <If> NOT Flag2Set()
- <Jump Sequence> "Lesson 2"
- <End If>
-
- <If> NOT Flag3Set()
- <Jump Sequence> "Lesson 3"
- <End If>
-
- <Panel> "Tutorial Outro"
- <End Sequence>
-
- <Define Panel> "Tutorial Intro"
- <On Panel Create> DoAppleScript( "StartHelperApp" )
- This is the first panel in the tutorial.
- It launches the helper App.
- <End Panel>
-
- <Define Panel> "Tutorial Outro"
- You have now completed all the tutorial.
- <End Panel>
-
- ######################################################################
- # Lesson Sequences & Panels
- #
- # These do not really do much but serve as examples of how to mark
- # Sequences as completed. The first panel use "StartHelperApp" to
- # make sure the helper app is up and running. The final panel uses
- # <On Panel Hide> SetFlag1() to mark that a lesson has been
- # finished.
- #
- ######################################################################
-
- #---------------------------------------------------------------------
- # Lesson 1 Sequence & Panels
- #---------------------------------------------------------------------
-
- <Define Sequence> "Lesson 1", "Lesson 1"
- <Panel> "Lesson 1 Panel 1"
- <Panel> "Lesson 1 Panel 2"
- <Panel> "Lesson 1 Panel Outro"
- <End Sequence>
-
- <Define Panel> "Lesson 1 Panel 1"
- <On Panel Create> DoAppleScript( "StartHelperApp" )
- First panel in Lesson 1
-
- This could contain your lesson's introduction.
-
- It also uses a script to make sure the helper app is open :
- "<On Panel Create> DoAppleScript( "StartHelperApp" )"
- <End Panel>
-
-
- <Define Panel> "Lesson 1 Panel 2"
- Second panel onwards...
-
- These contain your lesson's text.
- <End Panel>
-
-
- <Define Panel> "Lesson 1 Panel Outro"
- <On Panel Hide> SetFlag1()
- Last panel in Lesson 1.
-
- This may contain an acknowledgment that the lesson has been completed.
-
- It sets flag 1 with :
- "<On Panel Hide> SetFlag1()"
- <End Panel>
-
- #---------------------------------------------------------------------
- # Lesson 2 Sequence & Panels
- #---------------------------------------------------------------------
-
- <Define Sequence> "Lesson 2", "Lesson 2"
- <Panel> "Lesson 2 Panel 1"
- <Panel> "Lesson 2 Panel 2"
- <Panel> "Lesson 2 Panel Outro"
- <End Sequence>
-
- <Define Panel> "Lesson 2 Panel 1"
- <On Panel Create> DoAppleScript( "StartHelperApp" )
- First panel in Lesson 2
-
- This could contain your lesson's introduction.
-
- It also uses a script to make sure the helper app is open :
- "<On Panel Create> DoAppleScript( "StartHelperApp" )"
- <End Panel>
-
-
- <Define Panel> "Lesson 2 Panel 2"
- Second panel onwards...
-
- These contain your lesson text.
- <End Panel>
-
-
- <Define Panel> "Lesson 2 Panel Outro"
- <On Panel Hide> SetFlag2()
- Last panel in Lesson 2
-
- This may contain an acknowledgment that the lesson has been completed.
-
- It sets flag 2 with :
- "<On Panel Hide> SetFlag2()"
- <End Panel>
-
- #---------------------------------------------------------------------
- # Lesson 3 Sequence & Panels
- #---------------------------------------------------------------------
-
- <Define Sequence> "Lesson 3", "Lesson 3"
- <Panel> "Lesson 3 Panel 1"
- <Panel> "Lesson 3 Panel 2"
- <Panel> "Lesson 3 Panel Outro"
- <End Sequence>
-
- <Define Panel> "Lesson 3 Panel 1"
- <On Panel Create> DoAppleScript( "StartHelperApp" )
- First panel in Lesson 3
-
- This could contain your lesson's introduction.
-
- It also uses a script to make sure the helper app is open :
- "<On Panel Create> DoAppleScript( "StartHelperApp" )"
- <End Panel>
-
-
- <Define Panel> "Lesson 3 Panel 2"
- Second panel onwards...
-
- These contain your lesson text.
- <End Panel>
-
-
- <Define Panel> "Lesson 3 Panel Outro"
- <On Panel Hide> SetFlag3()
- Last panel in Lesson 3
-
- This may contain an acknowledgment that the lesson has been completed.
-
- It sets flag 3 with :
- "<On Panel Hide> SetFlag3()"
- <End Panel>
-
-
- ######################################################################
- # Reset the Lesson plan
- #
- # This is a one panel sequence that uses ClearValues() event to
- # set all the flags for the lesson plan to 0 i.e. not completed.
- ######################################################################
-
- <Define Sequence> "Reset the Lesson plan", "Reset the Lesson plan"
- <Seq Nav Button Set> NONE
- <Panel> "Values Cleared"
- <End Sequence>
-
-
- <Define Panel> "Values Cleared"
- <On Panel Create> ClearValues()
-
- Lesson plan reset
-
- <3D Button> 1070, 1072, Center, GoStart()
-
- <End Panel>
-
-
- ######################################################################
- # What is the Lesson Status?
- #
- # This sequence display what the current status of the flags are. It
- # uses the context checks Flag'n'Set() to work out which panel to
- # display. As there are 3 flags, there are 8 combinations, therefore
- # there are 8 different panels. The sequence arbitrates which to
- # display.
- ######################################################################
-
- <Define Sequence> "What is the Lesson Status?", "What is the Lesson Status?"
- <Seq Nav Button Set> NONE
- <IF> Flag1Set() AND Flag2Set() AND Flag3Set()
- <Panel> "On On On"
- <END IF>
-
- <IF> Flag1Set() AND Flag2Set() AND (NOT Flag3Set())
- <Panel> "On On Off"
- <END IF>
-
- <IF> Flag1Set() AND (NOT Flag2Set()) AND Flag3Set()
- <Panel> "On Off On"
- <END IF>
-
- <IF> Flag1Set() AND (NOT Flag2Set()) AND (NOT Flag3Set())
- <Panel> "On Off Off"
- <END IF>
-
- <IF> (NOT Flag1Set()) AND Flag2Set() AND Flag3Set()
- <Panel> "Off On On"
- <END IF>
-
- <IF> (NOT Flag1Set()) AND Flag2Set() AND (NOT Flag3Set())
- <Panel> "Off On Off"
- <END IF>
-
- <IF> (NOT Flag1Set()) AND (NOT Flag2Set()) AND Flag3Set()
- <Panel> "Off Off On"
- <END IF>
-
- <IF> (NOT Flag1Set()) AND (NOT Flag2Set()) AND (NOT Flag3Set())
- <Panel> "Off Off Off"
- <END IF>
- <End Sequence>
-
-
- <Define Panel> "Off Off Off"
-
- Lesson 1 - Not Completed
- Lesson 2 - Not Completed
- Lesson 3 - Not Completed
-
- <3D Button> 1070, 1072, Center, GoStart()
-
- <End Panel>
-
- <Define Panel> "Off Off On"
-
- Lesson 1 - Not Completed
- Lesson 2 - Not Completed
- Lesson 3 - Completed
-
- <3D Button> 1070, 1072, Center, GoStart()
-
- <End Panel>
-
- <Define Panel> "Off On Off"
-
- Lesson 1 - Not Completed
- Lesson 2 - Completed
- Lesson 3 - Not Completed
-
- <3D Button> 1070, 1072, Center, GoStart()
-
- <End Panel>
-
- <Define Panel> "Off On On"
-
- Lesson 1 - Not Completed
- Lesson 2 - Completed
- Lesson 3 - Completed
-
- <3D Button> 1070, 1072, Center, GoStart()
-
- <End Panel>
-
- <Define Panel> "On Off Off"
-
- Lesson 1 - Completed
- Lesson 2 - Not Completed
- Lesson 3 - Not Completed
-
- <3D Button> 1070, 1072, Center, GoStart()
-
- <End Panel>
-
- <Define Panel> "On Off On"
-
- Lesson 1 - Completed
- Lesson 2 - Not Completed
- Lesson 3 - Completed
-
- <3D Button> 1070, 1072, Center, GoStart()
-
- <End Panel>
-
- <Define Panel> "On On Off"
-
- Lesson 1 - Completed
- Lesson 2 - Completed
- Lesson 3 - Not Completed
-
- <3D Button> 1070, 1072, Center, GoStart()
-
- <End Panel>
-
- <Define Panel> "On On On"
-
- Lesson 1 - Completed
- Lesson 2 - Completed
- Lesson 3 - Completed
-
- <3D Button> 1070, 1072, Center, GoStart()
-
- <End Panel>
-
-
-
-
- ######################################################################
- # Define Context Checks
- #
- # <DCC> Name, context ID, Application ID, additional parameters...
- # Additional parameters have a type, e.g. LONG. This parameter needs to
- # be entered unless it has a :Constant after it, e.g LONG:1
- #
- # For Example:
- # <DCC> "IsFlagSet", 'Vals', 'AgHp', LONG:1, LONG
- # "IsFlagSet" - the context checks name
- # 'Vals' - the context ID Passed to the application
- # 'AgHp' - the application that the check is querying
- #
- # it has 2 additional parameters
- # LONG:1 - first parameter is a long and defaults to 1 therefore it
- # doesn't need to be enetered
- # LONG - second parameter is also a long but needs to be entered.
- #
- # To use the check you need make a call such as
- # IsFlagSet(3)
- # As the first parameter is defaulted to 1, 3 will be put into the
- # second parameter
- #
- # The structure passed to the applications context check should look like:
- # struct PassedAGParamType
- # {
- # long additionalParameter1;
- # long additionalParameter2;
- # };
- #
- #
- # IsFlagSet( n ) - Checks application constant n is set
- # IsFlagClear( n ) - Checks application constant n is clear
- # Flag1Set() - Checks application constant 1 is set
- # Flag2Set() - Checks application constant 2 is set
- # Flag3Set() - Checks application constant 3 is set
- #
- ######################################################################
-
- <DCC> "IsFlagSet", 'Vals', 'AgHp', LONG:1, LONG
- <DCC> "IsFlagClear", 'Vals', 'AgHp', LONG:0, LONG
-
- <DCC> "Flag1Set", 'Vals', 'AgHp', LONG:1, LONG:1
- <DCC> "Flag2Set", 'Vals', 'AgHp', LONG:1, LONG:2
- <DCC> "Flag3Set", 'Vals', 'AgHp', LONG:1, LONG:3
-
-
- ######################################################################
- # Define Events
- #
- # The following events set or clear 1 or all of the flags
- ######################################################################
-
- <Define Event> "ClearValues", 'AgHp', 'Vals', 'Cler'
-
- <Define Event> "SetFlag1", 'AgHp', 'Vals', 'Set1'
- <Define Event> "SetFlag2", 'AgHp', 'Vals', 'Set2'
- <Define Event> "SetFlag3", 'AgHp', 'Vals', 'Set3'
-
- <Define Event> "ClearFlag1", 'AgHp', 'Vals', 'Clr1'
- <Define Event> "ClearFlag2", 'AgHp', 'Vals', 'Clr2'
- <Define Event> "ClearFlag3", 'AgHp', 'Vals', 'Clr3'
-
-